package org.shoukaiseki.aqoeous.service.impl;

import com.github.pagehelper.PageHelper;
import org.shoukaiseki.aqoeous.exception.ResultException;
import org.shoukaiseki.aqoeous.model.ItemVO;
import org.shoukaiseki.aqoeous.model.qo.ItemQO;
import org.shoukaiseki.aqoeous.module.mapper.db2.ItemVOMapper;
import org.shoukaiseki.aqoeous.scan.Aqoeous;
import org.shoukaiseki.aqoeous.service.IAqoeous;
import org.shoukaiseki.aqoeous.service.ItemQueryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * org.shoukaiseki.aqoeous.service.impl.ItemQueryServiceImpl
 * <br>
 *
 * @author 蒋カイセキ    Japan-Tokyo  19-2-12 下午1:46<br>
 * ブログ http://www.shoukaiseki.top/<br>
 * E-メール jiang28555@Gmail.com<br>
 **/
@Service
@Aqoeous(qoClass = ItemQO.class)
public class ItemQueryServiceImpl implements ItemQueryService, IAqoeous<ItemQO> {

    @Resource
    ItemVOMapper itemVOMapper;


    @Override
    public List<ItemVO> selectItemVOList(ItemQO itemQO) {
        if(itemQO==null){
            return null;
        }
//        PageHelper.startPage(itemQO.getPageNum(), itemQO.getPageSize(), true);
        return itemVOMapper.selectItemVOList(itemQO);
    }

    @Override
    public List<ItemVO> aqoeous(ItemQO qo) {
            return itemVOMapper.selectItemVOList(qo);
    }
}
